<template>
请输入姓名：<input type="text" v-model="username">
<div>姓名是：{{username}}</div>
<input type="text" v-model.number="num1">
+
<input type="text" v-model.number="num2">
=
{{ num1+num2 }}
<br>
v-model.trem案例
<br>
<input type="text" v-model.trim="trim"><br>
处理后的值：{{trim}}

<br>
v-model.lazy案例
<br>
<input type="text" v-model.lazy="lazy1"><br>
当前值：{{lazy1}}
</template>
<script setup>
import { ref } from 'vue';
const username = ref('');
const num1 = ref("");
const num2 = ref("");
const trim = ref("");
const lazy1 = ref("");

</script>
<style scoped>

</style>